import*as e from"../../../core/i18n/i18n.js";import*as t from"../../lit-html/lit-html.js";import*as i from"../helpers/helpers.js";import*as o from"../icon_button/icon_button.js";import*as r from"../../../core/common/common.js";import*as s from"../../../core/platform/platform.js";import*as n from"../input/input.js";import*as a from"../../../core/host/host.js";import*as c from"../../../core/sdk/sdk.js";import*as l from"../../legacy/legacy.js";import*as d from"../../../models/bindings/bindings.js";const h=new CSSStyleSheet;h.replaceSync(".highlight-chip-list{min-height:20px;display:flex;flex-wrap:wrap;justify-content:left;align-items:center;background-color:var(--color-background);margin:8px 0;gap:8px;row-gap:6px}.highlight-chip{background:var(--color-background);border:1px solid var(--color-button-secondary-border);height:18px;border-radius:4px;flex:0 0 auto;max-width:250px;position:relative;padding:0 6px}.highlight-chip:hover{background-color:var(--color-background-elevation-1)}.delete-highlight-container{display:none;height:100%;position:absolute;right:0;top:0;border-radius:4px;width:24px;align-items:center;justify-content:center}.delete-highlight-button{cursor:pointer;width:13px;height:13px;border:none;background-color:transparent;display:flex;align-items:center;justify-content:center}.delete-highlight-button:hover{background-color:var(--color-details-hairline);border-radius:50%}.jump-to-highlight-button{cursor:pointer;padding:0;border:none;background:none;height:100%;align-items:center;max-width:100%;overflow:hidden}.delete-highlight-button devtools-icon{width:13px;height:13px;display:flex;align-items:center;justify-content:center;border-radius:50%}.source-code{font-family:var(--source-code-font-family);font-size:var(--source-code-font-size);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-primary)}.value{color:var(--color-syntax-2)}.separator{white-space:pre;flex-shrink:0}.highlight-chip.focused{border-color:var(--color-primary-old);background-color:var(--color-button-secondary-background-hovering)}.highlight-chip:hover > .delete-highlight-container{display:flex;background:linear-gradient(90deg,transparent 0%,rgb(241 243 244) 25%)}.highlight-chip.focused:hover > .delete-highlight-container{background:linear-gradient(90deg,transparent 0%,rgb(231 241 253) 25%)}:host-context(.-theme-with-dark-background) .highlight-chip:hover > .delete-highlight-container{display:flex;background:linear-gradient(90deg,transparent 0%,rgb(41 42 45) 25%)}:host-context(.-theme-with-dark-background) .highlight-chip.focused:hover > .delete-highlight-container{background:linear-gradient(90deg,transparent 0%,rgb(48 55 68) 25%)}\n/*# sourceURL=linearMemoryHighlightChipList.css */\n");const m={jumpToAddress:"Jump to this memory",deleteHighlight:"Stop highlighting this memory"},g=e.i18n.registerUIStrings("ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts",m),p=e.i18n.getLocalizedString.bind(void 0,g),{render:u,html:f}=t;class b extends Event{static eventName="deletememoryhighlight";data;constructor(e){super(b.eventName,{bubbles:!0,composed:!0}),this.data=e}}class v extends Event{static eventName="jumptohighlightedmemory";data;constructor(e){super(v.eventName),this.data=e}}class w extends HTMLElement{static litTagName=t.literal`devtools-linear-memory-highlight-chip-list`;#e=this.attachShadow({mode:"open"});#t=[];#i;connectedCallback(){this.#e.adoptedStyleSheets=[h]}set data(e){this.#t=e.highlightInfos,this.#i=e.focusedMemoryHighlight,this.#o()}#o(){const e=[];for(const t of this.#t)e.push(this.#r(t));const t=f` <div class="highlight-chip-list"> ${e} </div> `;u(t,this.#e,{host:this})}#r(e){const i=e.name||"<anonymous>",r=e.type,s={focused:e===this.#i,"highlight-chip":!0};return f` <div class="${t.Directives.classMap(s)}"> <button class="jump-to-highlight-button" title="${p(m.jumpToAddress)}" @click="${()=>this.#s(e.startAddress)}"> <span class="source-code"> <span class="value">${i}</span><span class="separator">: </span><span>${r}</span> </span> </button> <div class="delete-highlight-container"> <button class="delete-highlight-button" title="${p(m.deleteHighlight)}" @click="${()=>this.#n(e)}"> <${o.Icon.Icon.litTagName} .data="${{iconName:"cross",color:"var(--icon-default-hover)",width:"16px"}}"> </${o.Icon.Icon.litTagName}> </button> </div> </div> `}#s(e){this.dispatchEvent(new v(e))}#n(e){this.dispatchEvent(new b(e))}}i.CustomElements.defineComponent("devtools-linear-memory-highlight-chip-list",w);var k=Object.freeze({__proto__:null,DeleteMemoryHighlightEvent:b,JumpToHighlightedMemoryEvent:v,LinearMemoryHighlightChipList:w});const y=new CSSStyleSheet;y.replaceSync(":host{flex:auto;display:flex}.view{width:100%;display:flex;flex:1;flex-direction:column;font-family:var(--monospace-font-family);font-size:var(--monospace-font-size);padding:9px 12px 9px 7px}devtools-linear-memory-inspector-viewer{justify-content:center}devtools-linear-memory-inspector-navigator + devtools-linear-memory-inspector-viewer{margin-top:12px}.value-interpreter{display:flex}\n/*# sourceURL=linearMemoryInspector.css */\n");const x=new CSSStyleSheet;x.replaceSync(".navigator{min-height:24px;display:flex;flex-wrap:nowrap;justify-content:space-between;overflow:hidden;align-items:center;background-color:var(--color-background);color:var(--color-text-primary)}.navigator-item{display:flex;white-space:nowrap;overflow:hidden}.address-input{text-align:center;outline:none;color:var(--color-text-primary);border:1px solid var(--color-background-elevation-2);background:transparent}.address-input.invalid{color:var(--color-accent-red)}.navigator-button{display:flex;width:20px;height:20px;background:transparent;overflow:hidden;border:none;padding:0;outline:none;justify-content:center;align-items:center;cursor:pointer}.navigator-button:disabled devtools-icon{opacity:50%}.navigator-button:enabled:hover devtools-icon{--icon-color:var(--icon-default-hover)}.navigator-button:enabled:focus devtools-icon{--icon-color:var(--icon-default-hover)}\n/*# sourceURL=linearMemoryNavigator.css */\n");const I={enterAddress:"Enter address",goBackInAddressHistory:"Go back in address history",goForwardInAddressHistory:"Go forward in address history",previousPage:"Previous page",nextPage:"Next page",refresh:"Refresh"},M=e.i18n.registerUIStrings("ui/components/linear_memory_inspector/LinearMemoryNavigator.ts",I),T=e.i18n.getLocalizedString.bind(void 0,M),{render:S,html:E}=t;class $ extends Event{static eventName="addressinputchanged";data;constructor(e,t){super($.eventName),this.data={address:e,mode:t}}}class A extends Event{static eventName="pagenavigation";data;constructor(e){super(A.eventName,{}),this.data=e}}class N extends Event{static eventName="historynavigation";data;constructor(e){super(N.eventName,{}),this.data=e}}class R extends Event{static eventName="refreshrequested";constructor(){super(R.eventName,{})}}class L extends HTMLElement{static litTagName=t.literal`devtools-linear-memory-inspector-navigator`;#e=this.attachShadow({mode:"open"});#a="0";#c=void 0;#l=!0;#d=!1;#h=!1;connectedCallback(){this.#e.adoptedStyleSheets=[x]}set data(e){this.#a=e.address,this.#c=e.error,this.#l=e.valid,this.#d=e.canGoBackInHistory,this.#h=e.canGoForwardInHistory,this.#o();const t=this.#e.querySelector(".address-input");t&&("Submitted"===e.mode?t.blur():"InvalidSubmit"===e.mode&&t.select())}#o(){const e=E` <div class="navigator"> <div class="navigator-item"> ${this.#m({icon:"undo",title:T(I.goBackInAddressHistory),event:new N("Backward"),enabled:this.#d})} ${this.#m({icon:"redo",title:T(I.goForwardInAddressHistory),event:new N("Forward"),enabled:this.#h})} </div> <div class="navigator-item"> ${this.#m({icon:"chevron-left",title:T(I.previousPage),event:new A("Backward"),enabled:!0})} ${this.#g()} ${this.#m({icon:"chevron-right",title:T(I.nextPage),event:new A("Forward"),enabled:!0})} </div> ${this.#m({icon:"refresh",title:T(I.refresh),event:new R,enabled:!0})} </div> `;S(e,this.#e,{host:this})}#g(){const e={"address-input":!0,invalid:!this.#l};return E` <input class="${t.Directives.classMap(e)}" data-input="true" .value="${this.#a}" title="${this.#l?T(I.enterAddress):this.#c}" @change="${this.#p.bind(this,"Submitted")}" @input="${this.#p.bind(this,"Edit")}/">`}#p(e,t){const i=t.target;this.dispatchEvent(new $(i.value,e))}#m(e){return E` <button class="navigator-button" ?disabled="${!e.enabled}" data-button="${e.event.type}" title="${e.title}" @click="${this.dispatchEvent.bind(this,e.event)}"> <${o.Icon.Icon.litTagName} .data="${{iconName:e.icon,color:"var(--icon-default)",width:"20px",height:"20px"}}"> </${o.Icon.Icon.litTagName}> </button>`}}i.CustomElements.defineComponent("devtools-linear-memory-inspector-navigator",L);var O=Object.freeze({__proto__:null,AddressInputChangedEvent:$,PageNavigationEvent:A,HistoryNavigationEvent:N,RefreshRequestedEvent:R,LinearMemoryNavigator:L});const C=new CSSStyleSheet;C.replaceSync(":host{flex:auto;display:flex}.value-interpreter{--override-text-highlight-color:#80868b;border:var(--legacy-divider-border);background-color:var(--color-background-elevation-1);overflow:hidden;width:400px}.settings-toolbar{min-height:26px;display:flex;flex-wrap:nowrap;justify-content:space-between;padding-left:12px;padding-right:12px;align-items:center}.settings-toolbar-button{padding:0;width:20px;height:20px;border:none;outline:none;background-color:transparent;cursor:pointer}.settings-toolbar-button.active devtools-icon{--icon-color:var(--icon-toggled)}.divider{display:block;height:1px;margin-bottom:12px;background-color:var(--color-details-hairline,#d0d0d0)}\n/*# sourceURL=linearMemoryValueInterpreter.css */\n");const H=new CSSStyleSheet;H.replaceSync('*{box-sizing:border-box;min-width:0;min-height:0}:root{height:100%;overflow:hidden;--legacy-accent-color:#1a73e8;--legacy-accent-fg-color:#1a73e8;--legacy-accent-color-hover:#3b86e8;--legacy-accent-fg-color-hover:#1567d3;--legacy-active-control-bg-color:#5a5a5a;--legacy-focus-bg-color:hsl(214deg 40% 92%);--legacy-focus-ring-inactive-shadow-color:#e0e0e0;--legacy-input-validation-error:#db1600;--legacy-toolbar-hover-bg-color:#eaeaea;--legacy-selection-fg-color:#fff;--legacy-selection-bg-color:var(--legacy-accent-color);--legacy-selection-inactive-fg-color:#5a5a5a;--legacy-selection-inactive-bg-color:#dadada;--legacy-tab-selected-fg-color:#333;--legacy-divider-border:1px solid var(--color-details-hairline);--legacy-focus-ring-inactive-shadow:0 0 0 1px var(--legacy-focus-ring-inactive-shadow-color);--legacy-focus-ring-active-shadow:0 0 0 1px var(--legacy-accent-color);--legacy-item-selection-bg-color:#cfe8fc;--legacy-item-selection-inactive-bg-color:#e0e0e0;--item-hover-color:rgb(56 121 217/10%);--monospace-font-size:10px;--monospace-font-family:monospace;--source-code-font-size:11px;--source-code-font-family:monospace;--override-force-white-icons-background:#fafafa}.-theme-with-dark-background{color-scheme:dark;--legacy-accent-color:#0e639c;--legacy-accent-fg-color:#ccc;--legacy-accent-fg-color-hover:#fff;--legacy-accent-color-hover:rgb(17 119 187);--legacy-active-control-bg-color:#cdcdcd;--legacy-focus-bg-color:hsl(214deg 19% 27%);--legacy-focus-ring-inactive-shadow-color:#5a5a5a;--legacy-toolbar-hover-bg-color:#202020;--legacy-selection-fg-color:#cdcdcd;--legacy-selection-inactive-fg-color:#cdcdcd;--legacy-selection-inactive-bg-color:hsl(0deg 0% 28%);--legacy-tab-selected-fg-color:#eaeaea;--legacy-focus-ring-inactive-shadow:0 0 0 1px var(--legacy-focus-ring-inactive-shadow-color);--legacy-item-selection-bg-color:hsl(207deg 88% 22%);--legacy-item-selection-inactive-bg-color:#454545}body{height:100%;width:100%;position:relative;overflow:hidden;margin:0;cursor:default;font-family:".SFNSDisplay-Regular","Helvetica Neue","Lucida Grande",sans-serif;font-size:12px;tab-size:4;user-select:none;color:var(--color-text-primary);background:var(--color-background)}.platform-linux{font-family:Roboto,Ubuntu,Arial,sans-serif}.platform-mac{font-family:".SFNSDisplay-Regular","Helvetica Neue","Lucida Grande",sans-serif}.platform-mac,\n.platform-linux{--override-text-color:rgb(48 57 66);color:var(--override-text-color)}.platform-windows{font-family:"Segoe UI",Tahoma,sans-serif}:focus{outline-width:0}.platform-mac,\n:host-context(.platform-mac){--monospace-font-size:11px;--monospace-font-family:menlo,monospace;--source-code-font-size:11px;--source-code-font-family:menlo,monospace}.platform-windows,\n:host-context(.platform-windows){--monospace-font-size:12px;--monospace-font-family:consolas,lucida console,courier new,monospace;--source-code-font-size:12px;--source-code-font-family:consolas,lucida console,courier new,monospace}.platform-linux,\n:host-context(.platform-linux){--monospace-font-size:11px;--monospace-font-family:dejavu sans mono,monospace;--source-code-font-size:11px;--source-code-font-family:dejavu sans mono,monospace}.-theme-with-dark-background .platform-linux,\n.-theme-with-dark-background .platform-mac,\n:host-context(.-theme-with-dark-background) .platform-linux,\n:host-context(.-theme-with-dark-background) .platform-mac{--override-text-color:rgb(189 198 207)}.monospace{font-family:var(--monospace-font-family);font-size:var(--monospace-font-size)!important}.source-code{font-family:var(--source-code-font-family);font-size:var(--source-code-font-size)!important;white-space:pre-wrap}img{-webkit-user-drag:none}iframe,\na img{border:none}.fill{position:absolute;top:0;left:0;right:0;bottom:0}iframe.fill{width:100%;height:100%}.widget{position:relative;flex:auto;contain:style}.hbox{display:flex;flex-direction:row!important;position:relative}.vbox{display:flex;flex-direction:column!important;position:relative}.view-container > .toolbar{border-bottom:1px solid var(--color-details-hairline)}.flex-auto{flex:auto}.flex-none{flex:none}.flex-centered{display:flex;align-items:center;justify-content:center}.overflow-auto{overflow:auto;background-color:var(--color-background)}iframe.widget{position:absolute;width:100%;height:100%;left:0;right:0;top:0;bottom:0}.hidden{display:none!important}.highlighted-search-result{--override-highlighted-search-result-background-color:rgb(255 255 0/80%);border-radius:1px;background-color:var(--override-highlighted-search-result-background-color);outline:1px solid var(--override-highlighted-search-result-background-color)}.-theme-with-dark-background .highlighted-search-result,\n:host-context(.-theme-with-dark-background) .highlighted-search-result{--override-highlighted-search-result-background-color:hsl(133deg 100% 30%);color:#333}.link{cursor:pointer;text-decoration:underline;color:var(--color-link);outline-offset:2px}button,\ninput,\nselect{font-family:inherit;font-size:inherit}select option,\nselect optgroup,\ninput{background-color:var(--color-background)}input{color:inherit}input::placeholder{--override-input-placeholder-color:rgb(0 0 0/54%);color:var(--override-input-placeholder-color)}.-theme-with-dark-background input::placeholder,\n:host-context(.-theme-with-dark-background) input::placeholder{--override-input-placeholder-color:rgb(230 230 230/54%)}:host-context(.-theme-with-dark-background) input[type="checkbox"]:not(.-theme-preserve){accent-color:var(--color-checkbox-accent-color)}.harmony-input:not([type]),\n.harmony-input[type="number"],\n.harmony-input[type="text"]{padding:3px 6px;height:24px;border:none;box-shadow:var(--legacy-focus-ring-inactive-shadow)}.harmony-input:not([type]).error-input,\n.harmony-input[type="number"].error-input,\n.harmony-input[type="text"].error-input,\n.harmony-input:not([type]):invalid,\n.harmony-input[type="number"]:invalid,\n.harmony-input[type="text"]:invalid{box-shadow:0 0 0 1px var(--color-red)}.harmony-input:not([type]):not(.error-input):not(:invalid):hover,\n.harmony-input[type="number"]:not(.error-input):not(:invalid):hover,\n.harmony-input[type="text"]:not(.error-input):not(:invalid):hover{box-shadow:var(--legacy-focus-ring-inactive-shadow)}.harmony-input:not([type]):not(.error-input):not(:invalid):focus,\n.harmony-input[type="number"]:not(.error-input):not(:invalid):focus,\n.harmony-input[type="text"]:not(.error-input):not(:invalid):focus{box-shadow:var(--legacy-focus-ring-active-shadow)}.highlighted-search-result.current-search-result{--override-current-search-result-background-color:rgb(255 127 0/80%);border-radius:1px;padding:1px;margin:-1px;background-color:var(--override-current-search-result-background-color)}.dimmed{opacity:60%}.editing{box-shadow:var(--drop-shadow);background-color:var(--color-background);text-overflow:clip!important;padding-left:2px;margin-left:-2px;padding-right:2px;margin-right:-2px;margin-bottom:-1px;padding-bottom:1px;opacity:100%!important}.editing,\n.editing *{color:var(--color-text-primary)!important;text-decoration:none!important}.chrome-select{--override-chrome-select-border-color:rgb(0 0 0/20%);appearance:none;user-select:none;border:1px solid var(--override-chrome-select-border-color);border-radius:2px;color:var(--color-text-primary);font:inherit;margin:0;outline:none;padding-right:20px;padding-left:6px;background-image:var(--image-file-arrow-drop-down-light);background-color:var(--color-background-elevation-0);background-position:right center;background-repeat:no-repeat;min-height:24px;min-width:80px}.chrome-select:disabled{opacity:38%}.-theme-with-dark-background .chrome-select,\n:host-context(.-theme-with-dark-background) .chrome-select{--override-chrome-select-border-color:rgb(230 230 230/20%);background-image:var(--image-file-arrow-drop-down-dark)}.chrome-select:enabled:active,\n.chrome-select:enabled:focus,\n.chrome-select:enabled:hover{--override-select-box-shadow:0 0 0 2px var(--color-button-outline-focus);background-color:var(--color-background-elevation-1);box-shadow:var(--override-select-box-shadow)}.chrome-select:enabled:active{background-color:var(--color-background-elevation-2)}.chrome-select:enabled:focus{border-color:transparent}@media (forced-colors: active) and (prefers-color-scheme: light){.chrome-select{background-image:var(--image-file-arrow-drop-down-light)}.-theme-with-dark-background .chrome-select,\n  :host-context(.-theme-with-dark-background) .chrome-select{background-image:var(--image-file-arrow-drop-down-light)}}@media (forced-colors: active) and (prefers-color-scheme: dark){.chrome-select{background-image:var(--image-file-arrow-drop-down-dark)}.-theme-with-dark-background .chrome-select,\n  :host-context(.-theme-with-dark-background) .chrome-select{background-image:var(--image-file-arrow-drop-down-dark)}}.-theme-with-dark-background .chrome-select:enabled:active,\n.-theme-with-dark-background .chrome-select:enabled:focus,\n.-theme-with-dark-background .chrome-select:enabled:hover,\n:host-context(.-theme-with-dark-background) .chrome-select:enabled:active,\n:host-context(.-theme-with-dark-background) .chrome-select:enabled:focus,\n:host-context(.-theme-with-dark-background) .chrome-select:enabled:hover{--override-select-box-shadow:0 0 0 2px var(--color-button-outline-focus)}.chrome-select-label{margin:0 22px;flex:none}.chrome-select-label p p{margin-top:0;color:var(--color-text-secondary)}.settings-select{margin:0}.chrome-select optgroup,\n.chrome-select option{background-color:var(--color-background-elevation-1);color:var(--color-text-primary)}.gray-info-message{text-align:center;font-style:italic;padding:6px;color:var(--color-text-secondary);white-space:nowrap}span[is="dt-icon-label"]{flex:none}.full-widget-dimmed-banner a{color:inherit}.full-widget-dimmed-banner{color:var(--color-text-secondary);background-color:var(--color-background);display:flex;justify-content:center;align-items:center;text-align:center;padding:20px;position:absolute;top:0;right:0;bottom:0;left:0;font-size:13px;overflow:auto;z-index:500}[is="ui-icon"]{display:inline-block;flex-shrink:0}.-theme-with-dark-background [is="ui-icon"].icon-invert,\n:host-context(.-theme-with-dark-background) [is="ui-icon"].icon-invert{filter:invert(80%) hue-rotate(180deg)}[is="ui-icon"].icon-mask{background-color:var(--icon-default);-webkit-mask-position:var(--spritesheet-position)}.-theme-with-dark-background [is="ui-icon"].icon-mask,\n:host-context(.-theme-with-dark-background) [is="ui-icon"].icon-mask{--override-icon-mask-background-color:rgb(145 145 145)}[is="ui-icon"]:not(.icon-mask){background-position:var(--spritesheet-position)}.spritesheet-smallicons:not(.icon-mask){background-image:var(--image-file-smallIcons)}.spritesheet-smallicons.icon-mask{-webkit-mask-image:var(--image-file-smallIcons)}.spritesheet-largeicons:not(.icon-mask){background-image:var(--image-file-largeIcons)}.spritesheet-largeicons.icon-mask{-webkit-mask-image:var(--image-file-largeIcons)}.spritesheet-mediumicons:not(.icon-mask){background-image:var(--image-file-mediumIcons)}.spritesheet-mediumicons.icon-mask{-webkit-mask-image:var(--image-file-mediumIcons)}.spritesheet-arrowicons{background-image:var(--image-file-popoverArrows)}.spritesheet-3d-center.icon-mask{-webkit-mask-image:var(--image-file-3d-center)}.spritesheet-3d-pan.icon-mask{-webkit-mask-image:var(--image-file-3d-pan)}.spritesheet-3d-rotate.icon-mask{-webkit-mask-image:var(--image-file-3d-rotate)}.spritesheet-arrow-up-down-circle.icon-mask{-webkit-mask-image:var(--image-file-arrow-up-down-circle)}.spritesheet-arrow-up-down.icon-mask{-webkit-mask-image:var(--image-file-arrow-up-down)}.spritesheet-bell.icon-mask{-webkit-mask-image:var(--image-file-bell)}.spritesheet-bezier-curve-filled.icon-mask{-webkit-mask-image:var(--image-file-bezier-curve-filled)}.spritesheet-bin.icon-mask{-webkit-mask-image:var(--image-file-bin)}.spritesheet-bottom-panel-close.icon-mask{-webkit-mask-image:var(--image-file-bottom-panel-close)}.spritesheet-bottom-panel-open.icon-mask{-webkit-mask-image:var(--image-file-bottom-panel-open)}.spritesheet-brackets.icon-mask{-webkit-mask-image:var(--image-file-brackets)}.spritesheet-breakpoint-crossed-filled.icon-mask{-webkit-mask-image:var(--image-file-breakpoint-crossed-filled)}.spritesheet-breakpoint-crossed.icon-mask{-webkit-mask-image:var(--image-file-breakpoint-crossed)}.spritesheet-brush-filled.icon-mask{-webkit-mask-image:var(--image-file-brush-filled)}.spritesheet-brush.icon-mask{-webkit-mask-image:var(--image-file-brush)}.spritesheet-bug.icon-mask{-webkit-mask-image:var(--image-file-bug)}.spritesheet-check-double.icon-mask{-webkit-mask-image:var(--image-file-check-double)}.spritesheet-checkmark.icon-mask{-webkit-mask-image:var(--image-file-checkmark)}.spritesheet-chevron-double-right.icon-mask{-webkit-mask-image:var(--image-file-chevron-double-right)}.spritesheet-chevron-down.icon-mask{-webkit-mask-image:var(--image-file-chevron-down)}.spritesheet-chevron-up.icon-mask{-webkit-mask-image:var(--image-file-chevron-up)}.spritesheet-clear-list.icon-mask{-webkit-mask-image:var(--image-file-clear-list)}.spritesheet-clear.icon-mask{-webkit-mask-image:var(--image-file-clear)}.spritesheet-cloud.icon-mask{-webkit-mask-image:var(--image-file-cloud)}.spritesheet-code-circle.icon-mask{-webkit-mask-image:var(--image-file-code-circle)}.spritesheet-color-picker-filled.icon-mask{-webkit-mask-image:var(--image-file-color-picker-filled)}.spritesheet-color-picker.icon-mask{-webkit-mask-image:var(--image-file-color-picker)}.spritesheet-cookie.icon-mask{-webkit-mask-image:var(--image-file-cookie)}.spritesheet-copy.icon-mask{-webkit-mask-image:var(--image-file-copy)}.spritesheet-credit-card.icon-mask{-webkit-mask-image:var(--image-file-credit-card)}.spritesheet-cross-circle.icon-mask{-webkit-mask-image:var(--image-file-cross-circle)}.spritesheet-cross.icon-mask{-webkit-mask-image:var(--image-file-cross)}.spritesheet-custom-typography.icon-mask{-webkit-mask-image:var(--image-file-custom-typography)}.spritesheet-database.icon-mask{-webkit-mask-image:var(--image-file-database)}.spritesheet-device-fold.icon-mask{-webkit-mask-image:var(--image-file-device-fold)}.spritesheet-devices.icon-mask{-webkit-mask-image:var(--image-file-devices)}.spritesheet-dock-bottom.icon-mask{-webkit-mask-image:var(--image-file-dock-bottom)}.spritesheet-dock-left.icon-mask{-webkit-mask-image:var(--image-file-dock-left)}.spritesheet-dock-right.icon-mask{-webkit-mask-image:var(--image-file-dock-right)}.spritesheet-dock-window.icon-mask{-webkit-mask-image:var(--image-file-dock-window)}.spritesheet-document.icon-mask{-webkit-mask-image:var(--image-file-document)}.spritesheet-dots-vertical.icon-mask{-webkit-mask-image:var(--image-file-dots-vertical)}.spritesheet-download.icon-mask{-webkit-mask-image:var(--image-file-download)}.spritesheet-edit.icon-mask{-webkit-mask-image:var(--image-file-edit)}.spritesheet-experiment-check.icon-mask{-webkit-mask-image:var(--image-file-experiment-check)}.spritesheet-eye.icon-mask{-webkit-mask-image:var(--image-file-eye)}.spritesheet-filter-clear.icon-mask{-webkit-mask-image:var(--image-file-filter-clear)}.spritesheet-filter-filled.icon-mask{-webkit-mask-image:var(--image-file-filter-filled)}.spritesheet-filter.icon-mask{-webkit-mask-image:var(--image-file-filter)}.spritesheet-frame-crossed.icon-mask{-webkit-mask-image:var(--image-file-frame-crossed)}.spritesheet-frame.icon-mask{-webkit-mask-image:var(--image-file-frame)}.spritesheet-gear-filled.icon-mask{-webkit-mask-image:var(--image-file-gear-filled)}.spritesheet-gear.icon-mask{-webkit-mask-image:var(--image-file-gear)}.spritesheet-gears.icon-mask{-webkit-mask-image:var(--image-file-gears)}.spritesheet-heap-snapshot.icon-mask{-webkit-mask-image:var(--image-file-heap-snapshot)}.spritesheet-heap-snapshots.icon-mask{-webkit-mask-image:var(--image-file-heap-snapshots)}.spritesheet-iframe-crossed.icon-mask{-webkit-mask-image:var(--image-file-iframe-crossed)}.spritesheet-iframe.icon-mask{-webkit-mask-image:var(--image-file-iframe)}.spritesheet-import.icon-mask{-webkit-mask-image:var(--image-file-import)}.spritesheet-info.icon-mask{-webkit-mask-image:var(--image-file-info)}.spritesheet-keyboard-pen.icon-mask{-webkit-mask-image:var(--image-file-keyboard-pen)}.spritesheet-layers-filled.icon-mask{-webkit-mask-image:var(--image-file-layers-filled)}.spritesheet-layers.icon-mask{-webkit-mask-image:var(--image-file-layers)}.spritesheet-left-panel-close.icon-mask{-webkit-mask-image:var(--image-file-left-panel-close)}.spritesheet-left-panel-open.icon-mask{-webkit-mask-image:var(--image-file-left-panel-open)}.spritesheet-list.icon-mask{-webkit-mask-image:var(--image-file-list)}.spritesheet-pause.icon-mask{-webkit-mask-image:var(--image-file-pause)}.spritesheet-play.icon-mask{-webkit-mask-image:var(--image-file-play)}.spritesheet-plus.icon-mask{-webkit-mask-image:var(--image-file-plus)}.spritesheet-popup.icon-mask{-webkit-mask-image:var(--image-file-popup)}.spritesheet-profile.icon-mask{-webkit-mask-image:var(--image-file-profile)}.spritesheet-record-start.icon-mask{-webkit-mask-image:var(--image-file-record-start)}.spritesheet-record-stop.icon-mask{-webkit-mask-image:var(--image-file-record-stop)}.spritesheet-refresh.icon-mask{-webkit-mask-image:var(--image-file-refresh)}.spritesheet-replace.icon-mask{-webkit-mask-image:var(--image-file-replace)}.spritesheet-resume.icon-mask{-webkit-mask-image:var(--image-file-resume)}.spritesheet-right-panel-close.icon-mask{-webkit-mask-image:var(--image-file-right-panel-close)}.spritesheet-right-panel-open.icon-mask{-webkit-mask-image:var(--image-file-right-panel-open)}.spritesheet-screen-rotation.icon-mask{-webkit-mask-image:var(--image-file-screen-rotation)}.spritesheet-search.icon-mask{-webkit-mask-image:var(--image-file-search)}.spritesheet-select-element.icon-mask{-webkit-mask-image:var(--image-file-select-element)}.spritesheet-shadow.icon-mask{-webkit-mask-image:var(--image-file-shadow)}.spritesheet-step-into.icon-mask{-webkit-mask-image:var(--image-file-step-into)}.spritesheet-step-out.icon-mask{-webkit-mask-image:var(--image-file-step-out)}.spritesheet-step-over.icon-mask{-webkit-mask-image:var(--image-file-step-over)}.spritesheet-step.icon-mask{-webkit-mask-image:var(--image-file-step)}.spritesheet-stop.icon-mask{-webkit-mask-image:var(--image-file-stop)}.spritesheet-sync.icon-mask{-webkit-mask-image:var(--image-file-sync)}.spritesheet-table.icon-mask{-webkit-mask-image:var(--image-file-table)}.spritesheet-top-panel-close.icon-mask{-webkit-mask-image:var(--image-file-top-panel-close)}.spritesheet-top-panel-open.icon-mask{-webkit-mask-image:var(--image-file-top-panel-open)}.spritesheet-replay.icon-mask{-webkit-mask-image:var(--image-file-replay)}.spritesheet-triangle-bottom-right.icon-mask{-webkit-mask-image:var(--image-file-triangle-bottom-right)}.spritesheet-triangle-down.icon-mask{-webkit-mask-image:var(--image-file-triangle-down)}.spritesheet-triangle-left.icon-mask{-webkit-mask-image:var(--image-file-triangle-left)}.spritesheet-triangle-right.icon-mask{-webkit-mask-image:var(--image-file-triangle-right)}.spritesheet-triangle-up.icon-mask{-webkit-mask-image:var(--image-file-triangle-up)}.spritesheet-undo.icon-mask{-webkit-mask-image:var(--image-file-undo)}.spritesheet-warning.icon-mask{-webkit-mask-image:var(--image-file-warning)}.spritesheet-watch.icon-mask{-webkit-mask-image:var(--image-file-watch)}.force-white-icons [is="ui-icon"].spritesheet-smallicons,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-smallicons,\n[is="ui-icon"].force-white-icons.spritesheet-smallicons,\n.-theme-preserve{-webkit-mask-image:var(--image-file-smallIcons);-webkit-mask-position:var(--spritesheet-position);background:var(--override-force-white-icons-background)!important}.force-white-icons [is="ui-icon"].spritesheet-largeicons,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-largeicons,\n[is="ui-icon"].force-white-icons.spritesheet-largeicons,\n.-theme-preserve{-webkit-mask-image:var(--image-file-largeIcons);-webkit-mask-position:var(--spritesheet-position);background:var(--override-force-white-icons-background)!important}.force-white-icons [is="ui-icon"].spritesheet-mediumicons,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-mediumicons,\n[is="ui-icon"].force-white-icons.spritesheet-mediumicons,\n.-theme-preserve{-webkit-mask-image:var(--image-file-mediumIcons);-webkit-mask-position:var(--spritesheet-position);background:var(--override-force-white-icons-background)!important}.force-white-icons [is="ui-icon"].spritesheet-arrow-up-down,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-arrow-up-down,\n[is="ui-icon"].force-white-icons.spritesheet-arrow-up-down,\n.-theme-preserve{-webkit-mask-image:var(--image-file-arrow-up-down);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-bell,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-bell,\n[is="ui-icon"].force-white-icons.spritesheet-bell,\n.-theme-preserve{-webkit-mask-image:var(--image-file-bell);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-bug,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-bug,\n[is="ui-icon"].force-white-icons.spritesheet-bug,\n.-theme-preserve{-webkit-mask-image:var(--image-file-bug);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-cloud,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-cloud,\n[is="ui-icon"].force-white-icons.spritesheet-cloud,\n.-theme-preserve{-webkit-mask-image:var(--image-file-cloud);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-cookie,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-cookie,\n[is="ui-icon"].force-white-icons.spritesheet-cookie,\n.-theme-preserve{-webkit-mask-image:var(--image-file-cookie);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-credit-card,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-credit-card,\n[is="ui-icon"].force-white-icons.spritesheet-credit-card,\n.-theme-preserve{-webkit-mask-image:var(--image-file-credit-card);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-cross-circle,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-cross-circle,\n[is="ui-icon"].force-white-icons.spritesheet-cross-circle,\n.-theme-preserve{-webkit-mask-image:var(--image-file-cross-circle);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-database,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-database,\n[is="ui-icon"].force-white-icons.spritesheet-database,\n.-theme-preserve{-webkit-mask-image:var(--image-file-database);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-dock-bottom,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-dock-bottom,\n[is="ui-icon"].force-white-icons.spritesheet-dock-bottom,\n.-theme-preserve{-webkit-mask-image:var(--image-file-dock-bottom);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-dock-left,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-dock-left,\n[is="ui-icon"].force-white-icons.spritesheet-dock-left,\n.-theme-preserve{-webkit-mask-image:var(--image-file-dock-left);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-dock-right,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-dock-right,\n[is="ui-icon"].force-white-icons.spritesheet-dock-right,\n.-theme-preserve{-webkit-mask-image:var(--image-file-dock-right);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-dock-window,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-dock-window,\n[is="ui-icon"].force-white-icons.spritesheet-dock-window,\n.-theme-preserve{-webkit-mask-image:var(--image-file-dock-window);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-document,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-document,\n[is="ui-icon"].force-white-icons.spritesheet-document,\n.-theme-preserve{-webkit-mask-image:var(--image-file-document);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-frame-crossed,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-frame-crossed,\n[is="ui-icon"].force-white-icons.spritesheet-frame-crossed,\n.-theme-preserve{-webkit-mask-image:var(--image-file-frame-crossed);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-frame,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-frame,\n[is="ui-icon"].force-white-icons.spritesheet-frame,\n.-theme-preserve{-webkit-mask-image:var(--image-file-frame);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-gears,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-gears,\n[is="ui-icon"].force-white-icons.spritesheet-gears,\n.-theme-preserve{-webkit-mask-image:var(--image-file-gears);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-heap-snapshot,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-heap-snapshot,\n[is="ui-icon"].force-white-icons.spritesheet-heap-snapshot,\n.-theme-preserve{-webkit-mask-image:var(--image-file-heap-snapshot);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-heap-snapshots,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-heap-snapshots,\n[is="ui-icon"].force-white-icons.spritesheet-heap-snapshots,\n.-theme-preserve{-webkit-mask-image:var(--image-file-heap-snapshots);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-iframe-crossed,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-iframe-crossed,\n[is="ui-icon"].force-white-icons.spritesheet-iframe-crossed,\n.-theme-preserve{-webkit-mask-image:var(--image-file-iframe-crossed);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-iframe,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-iframe,\n[is="ui-icon"].force-white-icons.spritesheet-iframe,\n.-theme-preserve{-webkit-mask-image:var(--image-file-iframe);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-info,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-info,\n[is="ui-icon"].force-white-icons.spritesheet-info,\n.-theme-preserve{-webkit-mask-image:var(--image-file-info);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-list,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-list,\n[is="ui-icon"].force-white-icons.spritesheet-list,\n.-theme-preserve{-webkit-mask-image:var(--image-file-list);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-popup,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-popup,\n[is="ui-icon"].force-white-icons.spritesheet-popup,\n.-theme-preserve{-webkit-mask-image:var(--image-file-popup);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-profile,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-profile,\n[is="ui-icon"].force-white-icons.spritesheet-profile,\n.-theme-preserve{-webkit-mask-image:var(--image-file-profile);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-sync,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-sync,\n[is="ui-icon"].force-white-icons.spritesheet-sync,\n.-theme-preserve{-webkit-mask-image:var(--image-file-sync);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-table,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-table,\n[is="ui-icon"].force-white-icons.spritesheet-table,\n.-theme-preserve{-webkit-mask-image:var(--image-file-table);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-triangle-right,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-triangle-right,\n[is="ui-icon"].force-white-icons.spritesheet-triangle-right,\n.-theme-preserve{-webkit-mask-image:var(--image-file-triangle-right);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-warning,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-warning,\n[is="ui-icon"].force-white-icons.spritesheet-warning,\n.-theme-preserve{-webkit-mask-image:var(--image-file-warning);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.force-white-icons [is="ui-icon"].spritesheet-watch,\n:host-context(.force-white-icons) [is="ui-icon"].spritesheet-watch,\n[is="ui-icon"].force-white-icons.spritesheet-watch,\n.-theme-preserve{-webkit-mask-image:var(--image-file-watch);-webkit-mask-position:var(--spritesheet-position);background:var(--icon-force-white)!important}.dot::before{content:url("Images/empty.svg");width:6px;height:6px;border-radius:50%;outline:1px solid var(--icon-gap-default);left:9px;position:absolute;top:9px;z-index:1}.green::before{background-color:var(--color-tertiary-bright)}.purple::before{background-color:var(--color-purple-bright)}.expandable-inline-button{background-color:var(--color-background-elevation-2);color:var(--color-text-primary);cursor:pointer;border-radius:3px}.undisplayable-text,\n.expandable-inline-button{padding:1px 3px;margin:0 2px;font-size:11px;font-family:sans-serif;white-space:nowrap;display:inline-block}.undisplayable-text::after,\n.expandable-inline-button::after{content:attr(data-text)}.undisplayable-text{color:var(--color-text-disabled);font-style:italic}.expandable-inline-button:hover,\n.expandable-inline-button:focus-visible{background-color:var(--color-background-elevation-1)}.expandable-inline-button:focus-visible{background-color:var(--color-background-elevation-1)}::selection{--override-selection-background-color:rgb(141 199 248/60%);background-color:var(--override-selection-background-color)}.-theme-with-dark-background *::selection,\n:host-context(.-theme-with-dark-background) *::selection{background-color:rgb(93 93 93/60%)}.reload-warning{align-self:center;margin-left:10px}button.link{border:none;background:none;padding:3px}button.link:focus-visible{--override-link-focus-background-color:rgb(0 0 0/8%);background-color:var(--override-link-focus-background-color);border-radius:2px}.-theme-with-dark-background button.link:focus-visible,\n:host-context(.-theme-with-dark-background) button.link:focus-visible{--override-link-focus-background-color:rgb(230 230 230/8%)}@media (forced-colors: active){.dimmed,\n  .chrome-select:disabled{opacity:100%}[is="ui-icon"].icon-mask,\n  .force-white-icons [is="ui-icon"].spritesheet-smallicons,\n  :host-context(.force-white-icons) [is="ui-icon"].spritesheet-smallicons,\n  [is="ui-icon"].force-white-icons.spritesheet-smallicons,\n  .force-white-icons [is="ui-icon"].spritesheet-largeicons,\n  :host-context(.force-white-icons) [is="ui-icon"].spritesheet-largeicons,\n  [is="ui-icon"].force-white-icons.spritesheet-largeicons,\n  .force-white-icons [is="ui-icon"].spritesheet-mediumicons,\n  :host-context(.force-white-icons) [is="ui-icon"].spritesheet-mediumicons,\n  [is="ui-icon"].force-white-icons.spritesheet-mediumicons,\n  .-theme-preserve{forced-color-adjust:none;background-color:ButtonText}.harmony-input:not([type]),\n  .harmony-input[type="number"],\n  .harmony-input[type="text"]{border:1px solid ButtonText}.harmony-input:not([type]):focus,\n  .harmony-input[type="number"]:focus,\n  .harmony-input[type="text"]:focus{border:1px solid Highlight}}input.custom-search-input::-webkit-search-cancel-button{appearance:none;cursor:pointer;width:16px;height:15px;margin-right:0;background-position:-32px 32px;background-image:var(--image-file-mediumIcons)}.spinner::before{display:block;width:var(--dimension,24px);height:var(--dimension,24px);border:var(--override-spinner-size,3px) solid var(--override-spinner-color,var(--color-text-secondary));border-radius:12px;clip:rect(0,var(--clip-size,15px),var(--clip-size,15px),0);content:"";position:absolute;animation:spinner-animation 1s linear infinite;box-sizing:border-box}@keyframes spinner-animation{from{transform:rotate(0)}to{transform:rotate(360deg)}}.adorner-container{display:inline-block}.adorner-container.hidden{display:none}.adorner-container devtools-adorner{margin-left:3px}:host-context(.-theme-with-dark-background) devtools-adorner{--override-adorner-background-color:rgb(var(--color-syntax-2-rgb)/15%);--override-adorner-border-color:rgb(var(--color-syntax-2-rgb)/50%);--override-adorner-focus-border-color:var(--color-syntax-2);--override-adorner-active-background-color:var(--color-syntax-8)}.panel{display:flex;overflow:hidden;position:absolute;top:0;left:0;right:0;bottom:0;z-index:0;background-color:var(--color-background)}.panel-sidebar{overflow-x:hidden;background-color:var(--color-background-elevation-1)}iframe.extension{flex:auto;width:100%;height:100%}iframe.panel.extension{display:block;height:100%}@media (forced-colors: active){:root{--legacy-accent-color:Highlight;--legacy-focus-ring-inactive-shadow-color:ButtonText}}\n/*# sourceURL=inspectorCommon.css */\n');const j=new CSSStyleSheet;j.replaceSync(":host{flex:auto;display:flex}.mode-type{color:var(--override-text-highlight-color)}.value-types{width:100%;display:grid;grid-template-columns:auto auto 1fr;gap:4px 24px;min-height:24px;overflow:hidden;padding:2px 12px;align-items:baseline;justify-content:start}.value-type-cell{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:flex;flex-direction:column;min-height:24px}.value-type-value-with-link{display:flex;align-items:center}.value-type-cell-no-mode{grid-column:1/3}.jump-to-button{display:flex;width:20px;height:20px;border:none;padding:0;outline:none;justify-content:center;align-items:center;cursor:pointer}.signed-divider{width:1px;height:15px;background-color:var(--color-details-hairline);margin:0 4px}.selectable-text{user-select:text}.selectable-text::selection{background-color:var(--legacy-item-selection-bg-color)}\n/*# sourceURL=valueInterpreterDisplay.css */\n");const z={notApplicable:"N/A"},P=e.i18n.registerUIStrings("ui/components/linear_memory_inspector/ValueInterpreterDisplayUtils.ts",z),B=e.i18n.getLocalizedString.bind(void 0,P);function _(){return new Map(V)}const V=new Map([["Integer 8-bit","dec"],["Integer 16-bit","dec"],["Integer 32-bit","dec"],["Integer 64-bit","dec"],["Float 32-bit","dec"],["Float 64-bit","dec"],["Pointer 32-bit","hex"],["Pointer 64-bit","hex"]]),D=["dec","hex","oct","sci"];function U(t){return e.i18n.lockedString(t)}function F(e,t){switch(e){case"Integer 8-bit":case"Integer 16-bit":case"Integer 32-bit":case"Integer 64-bit":return"dec"===t||"hex"===t||"oct"===t;case"Float 32-bit":case"Float 64-bit":return"sci"===t||"dec"===t;case"Pointer 32-bit":case"Pointer 64-bit":return"hex"===t;default:return s.assertNever(e,`Unknown value type: ${e}`)}}function q(e){switch(e){case"Integer 8-bit":case"Integer 16-bit":case"Integer 32-bit":case"Integer 64-bit":case"Float 32-bit":case"Float 64-bit":return!0;default:return!1}}function G(e,t,i){if(!W(e))return console.error(`Requesting address of a non-pointer type: ${e}.\n`),NaN;try{const o=new DataView(t),r="Little Endian"===i;return"Pointer 32-bit"===e?o.getUint32(0,r):o.getBigUint64(0,r)}catch(e){return NaN}}function W(e){return"Pointer 32-bit"===e||"Pointer 64-bit"===e}function J(e){if(!e.mode)return console.error(`No known way of showing value for ${e.type}`),B(z.notApplicable);const t=new DataView(e.buffer),i="Little Endian"===e.endianness;let o;try{switch(e.type){case"Integer 8-bit":return o=e.signed?t.getInt8(0):t.getUint8(0),X(o,e.mode);case"Integer 16-bit":return o=e.signed?t.getInt16(0,i):t.getUint16(0,i),X(o,e.mode);case"Integer 32-bit":return o=e.signed?t.getInt32(0,i):t.getUint32(0,i),X(o,e.mode);case"Integer 64-bit":return o=e.signed?t.getBigInt64(0,i):t.getBigUint64(0,i),X(o,e.mode);case"Float 32-bit":return o=t.getFloat32(0,i),K(o,e.mode);case"Float 64-bit":return o=t.getFloat64(0,i),K(o,e.mode);case"Pointer 32-bit":return o=t.getUint32(0,i),X(o,"hex");case"Pointer 64-bit":return o=t.getBigUint64(0,i),X(o,"hex");default:return s.assertNever(e.type,`Unknown value type: ${e.type}`)}}catch(e){return B(z.notApplicable)}}function K(e,t){switch(t){case"dec":return e.toFixed(2).toString();case"sci":return e.toExponential(2).toString();default:throw new Error(`Unknown mode for floats: ${t}.`)}}function X(e,t){switch(t){case"dec":return e.toString();case"hex":return e<0?B(z.notApplicable):"0x"+e.toString(16).toUpperCase();case"oct":return e<0?B(z.notApplicable):e.toString(8);default:throw new Error(`Unknown mode for integers: ${t}.`)}}var Y=Object.freeze({__proto__:null,VALUE_INTEPRETER_MAX_NUM_BYTES:8,getDefaultValueTypeMapping:_,VALUE_TYPE_MODE_LIST:D,valueTypeToLocalizedString:U,isValidMode:F,isNumber:q,getPointerAddress:G,isPointer:W,format:J,formatFloat:K,formatInteger:X});const Q={unsignedValue:"`Unsigned` value",changeValueTypeMode:"Change mode",signedValue:"`Signed` value",jumpToPointer:"Jump to address",addressOutOfRange:"Address out of memory range"},Z=e.i18n.registerUIStrings("ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts",Q),ee=e.i18n.getLocalizedString.bind(void 0,Z),{render:te,html:ie}=t,oe=Array.from(_().keys());class re extends Event{static eventName="valuetypemodechanged";data;constructor(e,t){super(re.eventName,{composed:!0}),this.data={type:e,mode:t}}}class se extends Event{static eventName="jumptopointeraddress";data;constructor(e){super(se.eventName,{composed:!0}),this.data=e}}class ne extends HTMLElement{static litTagName=t.literal`devtools-linear-memory-inspector-interpreter-display`;#e=this.attachShadow({mode:"open"});#u="Little Endian";#f=new ArrayBuffer(0);#b=new Set;#v=_();#w=0;constructor(){super(),this.#e.adoptedStyleSheets=[H]}connectedCallback(){this.#e.adoptedStyleSheets=[j]}set data(e){this.#f=e.buffer,this.#u=e.endianness,this.#b=e.valueTypes,this.#w=e.memoryLength,e.valueTypeModes&&e.valueTypeModes.forEach(((e,t)=>{F(t,e)&&this.#v.set(t,e)})),this.#o()}#o(){te(ie` <div class="value-types"> ${oe.map((e=>this.#b.has(e)?this.#k(e):""))} </div> `,this.#e,{host:this})}#k(e){if(q(e))return this.#y(e);if(W(e))return this.#x(e);throw new Error(`No known way to format ${e}`)}#x(t){const i=this.#I({type:t,signed:!1}),r=G(t,this.#f,this.#u),s=Number.isNaN(r)||BigInt(r)>=BigInt(this.#w),n=ee(s?Q.addressOutOfRange:Q.jumpToPointer),a=s?"var(--icon-default)":"var(--icon-link)";return ie` <span class="value-type-cell-no-mode value-type-cell selectable-text">${e.i18n.lockedString(t)}</span> <div class="value-type-cell"> <div class="value-type-value-with-link" data-value="true"> <span class="selectable-text">${i}</span> ${ie` <button class="jump-to-button" data-jump="true" title="${n}" ?disabled="${s}" @click="${this.#M.bind(this,Number(r))}"> <${o.Icon.Icon.litTagName} .data="${{iconName:"open-externally",color:a,width:"16px"}}"> </${o.Icon.Icon.litTagName}> </button>`} </div> </div> `}#M(e){this.dispatchEvent(new se(e))}#y(t){return ie` <span class="value-type-cell selectable-text">${e.i18n.lockedString(t)}</span> <div> <select title="${ee(Q.changeValueTypeMode)}" data-mode-settings="true" class="chrome-select" style="border: none; background-color: transparent; cursor: pointer; color: var(--color-text-secondary);" @change="${this.#T.bind(this,t)}"> ${D.filter((e=>F(t,e))).map((i=>ie` <option value="${i}" .selected="${this.#v.get(t)===i}">${e.i18n.lockedString(i)} `))} </select> </div> ${this.#S(t)} `}#S(e){const t=this.#I({type:e,signed:!1}),i=this.#I({type:e,signed:!0}),o=this.#v.get(e),r=i!==t&&"hex"!==o&&"oct"!==o,s=ie`<span class="value-type-cell selectable-text" title="${ee(Q.unsignedValue)}" data-value="true">${t}</span>`;if(!r)return s;const n="Integer 32-bit"===e||"Integer 64-bit"===e,a=ie`<span class="selectable-text" data-value="true" title="${ee(Q.signedValue)}">${i}</span>`;return n?ie` <div class="value-type-cell"> ${s} ${a} </div> `:ie` <div class="value-type-cell" style="flex-direction: row;"> ${s} <span class="signed-divider"></span> ${a} </div> `}#T(e,t){t.preventDefault();const i=t.target.value;this.dispatchEvent(new re(e,i))}#I(e){const t=this.#v.get(e.type);return J({buffer:this.#f,type:e.type,endianness:this.#u,signed:e.signed||!1,mode:t})}}i.CustomElements.defineComponent("devtools-linear-memory-inspector-interpreter-display",ne);var ae=Object.freeze({__proto__:null,ValueTypeModeChangedEvent:re,JumpToPointerAddressEvent:se,ValueInterpreterDisplay:ne});const ce=new CSSStyleSheet;ce.replaceSync(":host{flex:auto;display:flex;min-height:20px}.settings{display:flex;flex-wrap:wrap;margin:0 12px 12px;column-gap:45px;row-gap:15px}.value-types-selection{display:flex;flex-direction:column}.group{font-weight:bold;margin-bottom:11px}.type-label{white-space:nowrap}.group + .type-label{margin-top:5px}.type-label input{margin:0 6px 0 0;padding:0}.type-label + .type-label{margin-top:6px}\n/*# sourceURL=valueInterpreterSettings.css */\n");const{render:le,html:de}=t,he={otherGroup:"Other"},me=e.i18n.registerUIStrings("ui/components/linear_memory_inspector/ValueInterpreterSettings.ts",he),ge=e.i18n.getLocalizedString.bind(void 0,me),pe=new Map([["Integer",["Integer 8-bit","Integer 16-bit","Integer 32-bit","Integer 64-bit"]],["Floating point",["Float 32-bit","Float 64-bit"]],["Other",["Pointer 32-bit","Pointer 64-bit"]]]);class ue extends Event{static eventName="typetoggle";data;constructor(e,t){super(ue.eventName),this.data={type:e,checked:t}}}class fe extends HTMLElement{static litTagName=t.literal`devtools-linear-memory-inspector-interpreter-settings`;#e=this.attachShadow({mode:"open"});#b=new Set;connectedCallback(){this.#e.adoptedStyleSheets=[n.checkboxStyles,ce]}set data(e){this.#b=e.valueTypes,this.#o()}#o(){le(de` <div class="settings"> ${[...pe.keys()].map((e=>de` <div class="value-types-selection"> <span class="group">${function(e){return"Other"===e?ge(he.otherGroup):e}(e)}</span> ${this.#E(e)} </div> `))} </div> `,this.#e,{host:this})}#E(e){const t=pe.get(e);if(!t)throw new Error(`Unknown group ${e}`);return de` ${t.map((e=>de` <label class="type-label" title="${U(e)}"> <input data-input="true" type="checkbox" .checked="${this.#b.has(e)}" @change="${t=>this.#$(e,t)}"> <span data-title="true">${U(e)}</span> </label> `))}`}#$(e,t){const i=t.target;this.dispatchEvent(new ue(e,i.checked))}}i.CustomElements.defineComponent("devtools-linear-memory-inspector-interpreter-settings",fe);var be=Object.freeze({__proto__:null,TypeToggleEvent:ue,ValueInterpreterSettings:fe});const ve={toggleValueTypeSettings:"Toggle value type settings",changeEndianness:"Change `Endianness`"},we=e.i18n.registerUIStrings("ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts",ve),ke=e.i18n.getLocalizedString.bind(void 0,we),{render:ye,html:xe}=t;class Ie extends Event{static eventName="endiannesschanged";data;constructor(e){super(Ie.eventName),this.data=e}}class Me extends Event{static eventName="valuetypetoggled";data;constructor(e,t){super(Me.eventName),this.data={type:e,checked:t}}}class Te extends HTMLElement{static litTagName=t.literal`devtools-linear-memory-inspector-interpreter`;#e=this.attachShadow({mode:"open"});#u="Little Endian";#f=new ArrayBuffer(0);#b=new Set;#v=new Map;#w=0;#A=!1;connectedCallback(){this.#e.adoptedStyleSheets=[C]}set data(e){this.#u=e.endianness,this.#f=e.value,this.#b=e.valueTypes,this.#v=e.valueTypeModes||new Map,this.#w=e.memoryLength,this.#o()}#o(){ye(xe` <div class="value-interpreter"> <div class="settings-toolbar"> ${this.#N()} <button data-settings="true" class="settings-toolbar-button ${this.#A?"active":""}" title="${ke(ve.toggleValueTypeSettings)}" @click="${this.#R}"> <${o.Icon.Icon.litTagName} .data="${{iconName:"gear",color:"var(--icon-default)",width:"20px"}}"> </${o.Icon.Icon.litTagName}> </button> </div> <span class="divider"></span> <div> ${this.#A?xe` <${fe.litTagName} .data="${{valueTypes:this.#b}}" @typetoggle="${this.#$}"> </${fe.litTagName}>`:xe` <${ne.litTagName} .data="${{buffer:this.#f,valueTypes:this.#b,endianness:this.#u,valueTypeModes:this.#v,memoryLength:this.#w}}"> </${ne.litTagName}>`} </div> </div> `,this.#e,{host:this})}#L(e){e.preventDefault();const t=e.target.value;this.dispatchEvent(new Ie(t))}#N(){const t=this.#L.bind(this);return xe` <label data-endianness-setting="true" title="${ke(ve.changeEndianness)}"> <select class="chrome-select" style="border: none; background-color: transparent; cursor: pointer;" data-endianness="true" @change="${t}"> ${["Little Endian","Big Endian"].map((t=>xe`<option value="${t}" .selected="${this.#u===t}">${e.i18n.lockedString(t)}`))} </select> </label> `}#R(){this.#A=!this.#A,this.#o()}#$(e){this.dispatchEvent(new Me(e.data.type,e.data.checked))}}i.CustomElements.defineComponent("devtools-linear-memory-inspector-interpreter",Te);var Se=Object.freeze({__proto__:null,EndiannessChangedEvent:Ie,ValueTypeToggledEvent:Me,LinearMemoryValueInterpreter:Te});const Ee=/^0x[a-fA-F0-9]+$/,$e=/^0$|[1-9]\d*$/;function Ae(e){const t=e.number.toString(16).padStart(e.pad,"0").toUpperCase();return e.prefix?"0x"+t:t}function Ne(e){return Ae({number:e,pad:8,prefix:!0})}function Re(e){const t=e.match(Ee),i=e.match($e);let o;return t&&t[0].length===e.length?o=parseInt(e,16):i&&i[0].length===e.length&&(o=parseInt(e,10)),o}var Le=Object.freeze({__proto__:null,HEXADECIMAL_REGEXP:Ee,DECIMAL_REGEXP:$e,toHexString:Ae,formatAddress:Ne,parseAddress:Re});const Oe=new CSSStyleSheet;Oe.replaceSync(":host{flex:auto;display:flex;min-height:20px}.view{overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;background:var(--color-background);outline:none}.row{display:flex;height:20px;align-items:center}.cell{text-align:center;border:1px solid transparent;border-radius:2px}.cell.selected{border-color:var(--color-syntax-3);color:var(--color-syntax-3);background-color:var(--legacy-item-selection-bg-color)}.byte-cell{min-width:21px;color:var(--color-text-primary)}.byte-group-margin{margin-left:var(--byte-group-margin)}.text-cell{min-width:14px;color:var(--color-syntax-3)}.address{color:var(--color-text-disabled)}.address.selected{font-weight:bold;color:var(--color-text-primary)}.divider{width:1px;height:inherit;background-color:var(--color-details-hairline);margin:0 4px}.highlight-area{background-color:var(--color-background-elevation-2)}.cell.focused-area{background-color:var(--color-primary-variant);color:var(--color-button-primary-text)}.cell.focused-area.selected{background:rgb(1 74 195);border-color:var(--color-button-outline-focus)}:host-context(.-theme-with-dark-background) .cell.focused-area.selected{background:rgb(192 216 255);border-color:var(--color-button-outline-focus)}\n/*# sourceURL=linearMemoryViewer.css */\n");const{render:Ce,html:He}=t;class je extends Event{static eventName="byteselected";data;constructor(e){super(je.eventName),this.data=e}}class ze extends Event{static eventName="resize";data;constructor(e){super(ze.eventName),this.data=e}}class Pe extends HTMLElement{static litTagName=t.literal`devtools-linear-memory-inspector-viewer`;#e=this.attachShadow({mode:"open"});#O=new ResizeObserver((()=>this.#C()));#H=!1;#j=new Uint8Array;#a=0;#z=0;#P;#i;#B=1;#_=4;#V=!0;#D=void 0;set data(e){if(e.address<e.memoryOffset||e.address>e.memoryOffset+e.memory.length||e.address<0)throw new Error("Address is out of bounds.");if(e.memoryOffset<0)throw new Error("Memory offset has to be greater or equal to zero.");this.#j=e.memory,this.#a=e.address,this.#P=e.highlightInfo,this.#i=e.focusedMemoryHighlight,this.#z=e.memoryOffset,this.#V=e.focus,this.#U()}connectedCallback(){i.SetCSSProperty.set(this,"--byte-group-margin","8px"),this.#e.adoptedStyleSheets=[Oe]}disconnectedCallback(){this.#H=!1,this.#O.disconnect()}#U(){this.#F(),this.#o(),this.#q(),this.#G()}#q(){if(this.#V){const e=this.#e.querySelector(".view");e&&e.focus()}}#C(){this.#U(),this.dispatchEvent(new ze(this.#_*this.#B))}#F(){if(0===this.clientWidth||0===this.clientHeight||!this.shadowRoot)return this.#_=4,void(this.#B=1);const e=this.shadowRoot.querySelector(".byte-cell"),t=this.shadowRoot.querySelector(".text-cell"),i=this.shadowRoot.querySelector(".divider"),o=this.shadowRoot.querySelector(".row"),r=this.shadowRoot.querySelector(".address");if(!(e&&t&&i&&o&&r))return this.#_=4,void(this.#B=1);const s=4*(e.getBoundingClientRect().width+t.getBoundingClientRect().width)+8,n=i.getBoundingClientRect().width,a=e.getBoundingClientRect().left-r.getBoundingClientRect().left,c=this.clientWidth-1-a-n;if(c<s)return this.#_=4,void(this.#B=1);this.#_=4*Math.floor(c/s),this.#B=Math.floor(this.clientHeight/o.clientHeight)}#G(){this.#O&&!this.#H&&(this.#O.observe(this),this.#H=!0)}#o(){Ce(He` <div class="view" tabindex="0" @keydown="${this.#W}"> ${this.#J()} </div> `,this.#e,{host:this})}#W(e){const t=e;let i;"ArrowUp"===t.code?i=this.#a-this.#_:"ArrowDown"===t.code?i=this.#a+this.#_:"ArrowLeft"===t.code?i=this.#a-1:"ArrowRight"===t.code?i=this.#a+1:"PageUp"===t.code?i=this.#a-this.#_*this.#B:"PageDown"===t.code&&(i=this.#a+this.#_*this.#B),void 0!==i&&i!==this.#D&&(this.#D=i,this.dispatchEvent(new je(i)))}#J(){const e=[];for(let t=0;t<this.#B;++t)e.push(this.#K(t));return He`${e}`}#K(e){const{startIndex:i,endIndex:o}={startIndex:e*this.#_,endIndex:(e+1)*this.#_},r={address:!0,selected:Math.floor((this.#a-this.#z)/this.#_)===e};return He` <div class="row"> <span class="${t.Directives.classMap(r)}">${Ae({number:i+this.#z,pad:8,prefix:!1})}</span> <span class="divider"></span> ${this.#X(i,o)} <span class="divider"></span> ${this.#Y(i,o)} </div> `}#X(e,i){const o=[];for(let r=e;r<i;++r){const i=r+this.#z,s={cell:!0,"byte-cell":!0,"byte-group-margin":r!==e&&(r-e)%4==0,selected:r===this.#a-this.#z,"highlight-area":this.#Q(i),"focused-area":this.#Z(i)},n=r<this.#j.length,a=n?He`${Ae({number:this.#j[r],pad:2,prefix:!1})}`:"",c=n?this.#ee.bind(this,i):"";o.push(He`<span class="${t.Directives.classMap(s)}" @click="${c}">${a}</span>`)}return He`${o}`}#Y(e,i){const o=[];for(let r=e;r<i;++r){const e=r+this.#z,i=this.#Q(e),s=this.#Z(e),n={cell:!0,"text-cell":!0,selected:this.#a-this.#z===r,"highlight-area":i,"focused-area":s},a=r<this.#j.length,c=a?He`${this.#te(this.#j[r])}`:"",l=a?this.#ee.bind(this,r+this.#z):"";o.push(He`<span class="${t.Directives.classMap(n)}" @click="${l}">${c}</span>`)}return He`${o}`}#te(e){return e>=20&&e<=127?String.fromCharCode(e):"."}#ee(e){this.dispatchEvent(new je(e))}#Q(e){return void 0!==this.#P&&(this.#P.startAddress<=e&&e<this.#P.startAddress+this.#P.size)}#Z(e){return!!this.#i&&(this.#i.startAddress<=e&&e<this.#i.startAddress+this.#i.size)}}i.CustomElements.defineComponent("devtools-linear-memory-inspector-viewer",Pe);var Be=Object.freeze({__proto__:null,ByteSelectedEvent:je,ResizeEvent:ze,LinearMemoryViewer:Pe});const{render:_e,html:Ve}=t,De={addressHasToBeANumberBetweenSAnd:"Address has to be a number between {PH1} and {PH2}"},Ue=e.i18n.registerUIStrings("ui/components/linear_memory_inspector/LinearMemoryInspector.ts",De),Fe=e.i18n.getLocalizedString.bind(void 0,Ue);class qe extends Event{static eventName="memoryrequest";data;constructor(e,t,i){super(qe.eventName),this.data={start:e,end:t,address:i}}}class Ge extends Event{static eventName="addresschanged";data;constructor(e){super(Ge.eventName),this.data=e}}class We extends Event{static eventName="settingschanged";data;constructor(e){super(We.eventName),this.data=e}}class Je{#a=0;#ie;constructor(e,t){if(e<0)throw new Error("Address should be a greater or equal to zero");this.#a=e,this.#ie=t}valid(){return!0}reveal(){this.#ie(this.#a)}}class Ke extends HTMLElement{static litTagName=t.literal`devtools-linear-memory-inspector-inspector`;#e=this.attachShadow({mode:"open"});#oe=new r.SimpleHistoryManager.SimpleHistoryManager(10);#j=new Uint8Array;#z=0;#re=0;#a=-1;#P;#se="Submitted";#ne=`${this.#a}`;#ae=4;#ce=_();#b=new Set(this.#ce.keys());#u="Little Endian";connectedCallback(){this.#e.adoptedStyleSheets=[y]}set data(e){if(e.address<e.memoryOffset||e.address>e.memoryOffset+e.memory.length||e.address<0)throw new Error("Address is out of bounds.");if(e.memoryOffset<0)throw new Error("Memory offset has to be greater or equal to zero.");if(e.highlightInfo){if(e.highlightInfo.size<0)throw new Error("Object size has to be greater than or equal to zero");if(e.highlightInfo.startAddress<0||e.highlightInfo.startAddress>=e.outerMemoryLength)throw new Error("Object start address is out of bounds.")}this.#j=e.memory,this.#z=e.memoryOffset,this.#re=e.outerMemoryLength,this.#ce=e.valueTypeModes||this.#ce,this.#b=e.valueTypes||this.#b,this.#u=e.endianness||this.#u,this.#P=e.highlightInfo,this.#le(e.address),this.#o()}#o(){const{start:e,end:t}=this.#de(this.#a,this.#ae),i="Submitted"===this.#se?Ne(this.#a):this.#ne,o=this.#he(i),r=Fe(De.addressHasToBeANumberBetweenSAnd,{PH1:Ne(0),PH2:Ne(this.#re)}),s=o?void 0:r,n=this.#oe.canRollback(),a=this.#oe.canRollover(),c=this.#P?[this.#P]:[],l=this.#me(c,this.#a);_e(Ve` <div class="view"> <${L.litTagName} .data="${{address:i,valid:o,mode:this.#se,error:s,canGoBackInHistory:n,canGoForwardInHistory:a}}" @refreshrequested="${this.#ge}" @addressinputchanged="${this.#p}" @pagenavigation="${this.#pe}" @historynavigation="${this.#ue}"></${L.litTagName}> <${w.litTagName} .data="${{highlightInfos:c,focusedMemoryHighlight:l}}" @jumptohighlightedmemory="${this.#fe}"> </${w.litTagName}> <${Pe.litTagName} .data="${{memory:this.#j.slice(e-this.#z,t-this.#z),address:this.#a,memoryOffset:e,focus:"Submitted"===this.#se,highlightInfo:this.#P,focusedMemoryHighlight:l}}" @byteselected="${this.#be}" @resize="${this.#C}"> </${Pe.litTagName}> </div> <div class="value-interpreter"> <${Te.litTagName} .data="${{value:this.#j.slice(this.#a-this.#z,this.#a+8).buffer,valueTypes:this.#b,valueTypeModes:this.#ce,endianness:this.#u,memoryLength:this.#re}}" @valuetypetoggled="${this.#ve}" @valuetypemodechanged="${this.#we}" @endiannesschanged="${this.#ke}" @jumptopointeraddress="${this.#fe}"> </${Te.litTagName}> </div> `,this.#e,{host:this})}#fe(e){e.stopPropagation(),this.#se="Submitted";const t=Math.max(0,Math.min(e.data,this.#re-1));this.#ye(t)}#ge(){const{start:e,end:t}=this.#de(this.#a,this.#ae);this.dispatchEvent(new qe(e,t,this.#a))}#be(e){this.#se="Submitted";const t=Math.max(0,Math.min(e.data,this.#re-1));this.#ye(t)}#xe(){return{valueTypes:this.#b,modes:this.#ce,endianness:this.#u}}#ke(e){this.#u=e.data,this.dispatchEvent(new We(this.#xe())),this.#o()}#he(e){const t=Re(e);return void 0!==t&&t>=0&&t<this.#re}#p(e){const{address:t,mode:i}=e.data,o=this.#he(t),r=Re(t);if(this.#ne=t,void 0!==r&&o)return this.#se=i,void this.#ye(r);this.#se="Submitted"!==i||o?"Edit":"InvalidSubmit",this.#o()}#ve(e){const{type:t,checked:i}=e.data;i?this.#b.add(t):this.#b.delete(t),this.dispatchEvent(new We(this.#xe())),this.#o()}#we(e){e.stopImmediatePropagation();const{type:t,mode:i}=e.data;this.#ce.set(t,i),this.dispatchEvent(new We(this.#xe())),this.#o()}#ue(e){return"Forward"===e.data?this.#oe.rollover():this.#oe.rollback()}#pe(e){const t="Forward"===e.data?this.#a+this.#ae:this.#a-this.#ae,i=Math.max(0,Math.min(t,this.#re-1));this.#ye(i)}#ye(e){e<0||e>=this.#re?console.warn(`Specified address is out of bounds: ${e}`):(this.#le(e),this.#U())}#de(e,t){const i=Math.floor(e/t)*t;return{start:i,end:Math.min(i+t,this.#re)}}#C(e){this.#ae=e.data,this.#U()}#U(){const{start:e,end:t}=this.#de(this.#a,this.#ae);e<this.#z||t>this.#z+this.#j.length?this.dispatchEvent(new qe(e,t,this.#a)):this.#o()}#le(e){if(this.#a===e)return;const t=new Je(e,(()=>this.#ye(e)));this.#oe.push(t),this.#a=e,this.dispatchEvent(new Ge(this.#a))}#me(e,t){let i;for(const o of e)o.startAddress<=t&&t<o.startAddress+o.size&&(i?o.size<i.size&&(i=o):i=o);return i}}i.CustomElements.defineComponent("devtools-linear-memory-inspector-inspector",Ke);var Xe=Object.freeze({__proto__:null,MemoryRequestEvent:qe,AddressChangedEvent:Ge,SettingsChangedEvent:We,LinearMemoryInspector:Ke});const Ye={noOpenInspections:"No open inspections"},Qe=e.i18n.registerUIStrings("ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts",Ye),Ze=e.i18n.getLocalizedString.bind(void 0,Qe);let et,tt;class it extends l.Widget.VBox{view;constructor(){super(),this.view=ot.instance()}static instance(e={forceNew:null}){const{forceNew:t}=e;return tt&&!t||(tt=new it),tt}wasShown(){this.view.show(this.contentElement)}}class ot extends(r.ObjectWrapper.eventMixin(l.Widget.VBox)){#Ie;#Me;constructor(){super(!1);const e=document.createElement("div");e.textContent=Ze(Ye.noOpenInspections),e.style.display="flex",this.#Ie=new l.TabbedPane.TabbedPane,this.#Ie.setPlaceholderElement(e),this.#Ie.setCloseableTabs(!0),this.#Ie.setAllowTabReorder(!0,!0),this.#Ie.addEventListener(l.TabbedPane.Events.TabClosed,this.#Te,this),this.#Ie.show(this.contentElement),this.#Me=new Map}static instance(){return et||(et=new ot),et}getViewForTabId(e){const t=this.#Me.get(e);if(!t)throw new Error(`No linear memory inspector view for the given tab id: ${e}`);return t}create(e,t,i,o){const r=new rt(i,o,e);this.#Me.set(e,r),this.#Ie.appendTab(e,t,r,void 0,!1,!0),this.#Ie.selectTab(e)}close(e){this.#Ie.closeTab(e,!1)}reveal(e,t){const i=this.getViewForTabId(e);void 0!==t&&i.updateAddress(t),this.refreshView(e),this.#Ie.selectTab(e)}refreshView(e){this.getViewForTabId(e).refreshData()}#Te(e){const{tabId:t}=e.data;this.#Me.delete(t),this.dispatchEventToListeners("ViewClosed",t)}}class rt extends l.Widget.VBox{#Se;#a;#Ee;#$e;firstTimeOpen;constructor(e,t=0,i){if(super(!1),t<0||t>=e.length())throw new Error("Requested address is out of bounds.");this.#Se=e,this.#a=t,this.#Ee=i,this.#$e=new Ke,this.#$e.addEventListener(qe.eventName,(e=>{this.#Ae(e)})),this.#$e.addEventListener(Ge.eventName,(e=>{this.updateAddress(e.data)})),this.#$e.addEventListener(We.eventName,(e=>{e.stopPropagation(),this.saveSettings(e.data)})),this.#$e.addEventListener(b.eventName,(e=>{gt.instance().removeHighlight(this.#Ee,e.data),this.refreshData()})),this.contentElement.appendChild(this.#$e),this.firstTimeOpen=!0}wasShown(){this.refreshData()}saveSettings(e){gt.instance().saveSettings(e)}updateAddress(e){if(e<0||e>=this.#Se.length())throw new Error("Requested address is out of bounds.");this.#a=e}refreshData(){gt.getMemoryForAddress(this.#Se,this.#a).then((({memory:e,offset:t})=>{let i,o,r;if(this.firstTimeOpen){const e=gt.instance().loadSettings();i=e.valueTypes,o=e.modes,r=e.endianness,this.firstTimeOpen=!1}this.#$e.data={memory:e,address:this.#a,memoryOffset:t,outerMemoryLength:this.#Se.length(),valueTypes:i,valueTypeModes:o,endianness:r,highlightInfo:this.#Ne()}}))}#Ae(e){const{start:t,end:i,address:o}=e.data;if(o<t||o>=i)throw new Error("Requested address is out of bounds.");gt.getMemoryRange(this.#Se,t,i).then((e=>{this.#$e.data={memory:e,address:o,memoryOffset:t,outerMemoryLength:this.#Se.length(),highlightInfo:this.#Ne()}}))}#Ne(){const e=gt.instance().getHighlightInfo(this.#Ee);if(void 0!==e){if(e.startAddress<0||e.startAddress>=this.#Se.length())throw new Error("HighlightInfo start address is out of bounds.");if(e.size<=0)throw new Error("Highlight size must be a positive number.")}return e}}var st=Object.freeze({__proto__:null,Wrapper:it,LinearMemoryInspectorPaneImpl:ot});const nt={couldNotOpenLinearMemory:"Could not open linear memory inspector: failed locating buffer."},at=e.i18n.registerUIStrings("ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts",nt),ct=e.i18n.getLocalizedString.bind(void 0,at),lt=["webassemblymemory","typedarray","dataview","arraybuffer"];let dt;class ht{#Re;constructor(e){this.#Re=e}length(){return this.#Re.byteLength()}async getRange(e,t){const i=Math.min(t,this.length());if(e<0||e>i)return console.error(`Requesting invalid range of memory: (${e}, ${t})`),new Uint8Array(0);const o=await this.#Re.bytes(e,i);return new Uint8Array(o)}}function mt(e){return e instanceof d.DebuggerLanguagePlugins.ExtensionRemoteObject&&void 0!==e.linearMemoryAddress}class gt extends c.TargetManager.SDKModelObserver{#Le=ot.instance();#Oe=new Map;#Ce=new Map;#He;constructor(){super(),c.TargetManager.TargetManager.instance().observeModels(c.RuntimeModel.RuntimeModel,this),c.TargetManager.TargetManager.instance().addModelListener(c.DebuggerModel.DebuggerModel,c.DebuggerModel.Events.GlobalObjectCleared,this.#je,this),this.#Le.addEventListener("ViewClosed",this.#ze.bind(this)),c.TargetManager.TargetManager.instance().addModelListener(c.DebuggerModel.DebuggerModel,c.DebuggerModel.Events.DebuggerPaused,this.#Pe,this);const e=_(),t={valueTypes:Array.from(e.keys()),valueTypeModes:Array.from(e),endianness:"Little Endian"};this.#He=r.Settings.Settings.instance().createSetting("lmiInterpreterSettings",t)}static instance(){return dt||(dt=new gt,dt)}static async getMemoryForAddress(e,t){const i=Math.max(0,t-500),o=i+1e3;return{memory:await e.getRange(i,o),offset:i}}static async getMemoryRange(e,t,i){if(t<0||t>i||t>=e.length())throw new Error("Requested range is out of bounds.");const o=Math.max(i,t+1e3);return await e.getRange(t,o)}async evaluateExpression(e,t){const i=await e.evaluate({expression:t});if("error"in i)console.error(`Tried to evaluate the expression '${t}' but got an error: ${i.error}`);else{if(!("exceptionDetails"in i)||!i?.exceptionDetails?.text)return i.object;console.error(`Tried to evaluate the expression '${t}' but got an exception: ${i.exceptionDetails.text}`)}}saveSettings(e){const t=Array.from(e.valueTypes),i=[...e.modes];this.#He.set({valueTypes:t,valueTypeModes:i,endianness:e.endianness})}loadSettings(){const e=this.#He.get();return{valueTypes:new Set(e.valueTypes),modes:new Map(e.valueTypeModes),endianness:e.endianness}}getHighlightInfo(e){return this.#Ce.get(e)}removeHighlight(e,t){this.getHighlightInfo(e)===t&&this.#Ce.delete(e)}setHighlightInfo(e,t){this.#Ce.set(e,t)}#Be(e){this.#Ce.delete(e)}static async retrieveDWARFMemoryObjectAndAddress(e){if(!(e instanceof d.DebuggerLanguagePlugins.ExtensionRemoteObject))return;const t=e,i=e.linearMemoryAddress;if(void 0===i)return;const o=t.callFrame,s=await e.debuggerModel().agent.invoke_evaluateOnCallFrame({callFrameId:o.id,expression:"memories[0]"}),n=s.getError();n&&(console.error(n),r.Console.Console.instance().error(ct(nt.couldNotOpenLinearMemory)));return{obj:e.debuggerModel().runtimeModel().createRemoteObject(s.result),address:i}}static extractObjectSize(e){return e.linearMemorySize??0}static extractObjectTypeDescription(e){const t=e.description;if(!t)return"";const i=t.charAt(t.length-1),o=t.charAt(t.length-2);return"*"===i||"&"===i?" "===o?t.slice(0,t.length-2):t.slice(0,t.length-1):t}static extractObjectName(e,t){const i=e.description?.charAt(e.description.length-1);return"*"===i?"*"+t:t}async openInspectorView(e,t,i){const o=await gt.retrieveDWARFMemoryObjectAndAddress(e);let r=e,s=t;void 0!==o&&(s=o.address,r=o.obj),void 0!==s?a.userMetrics.linearMemoryInspectorTarget(a.UserMetrics.LinearMemoryInspectorTarget.DWARFInspectableAddress):"arraybuffer"===r.subtype?a.userMetrics.linearMemoryInspectorTarget(a.UserMetrics.LinearMemoryInspectorTarget.ArrayBuffer):"dataview"===r.subtype?a.userMetrics.linearMemoryInspectorTarget(a.UserMetrics.LinearMemoryInspectorTarget.DataView):"typedarray"===r.subtype?a.userMetrics.linearMemoryInspectorTarget(a.UserMetrics.LinearMemoryInspectorTarget.TypedArray):(console.assert("webassemblymemory"===r.subtype),a.userMetrics.linearMemoryInspectorTarget(a.UserMetrics.LinearMemoryInspectorTarget.WebAssemblyMemory));const n=await async function(e){console.assert("object"===e.type),console.assert(void 0!==e.subtype&&lt.includes(e.subtype));const t=await e.runtimeModel().agent.invoke_callFunctionOn({objectId:e.objectId,functionDeclaration:"function() { return this instanceof ArrayBuffer || (typeof SharedArrayBuffer !== 'undefined' && this instanceof SharedArrayBuffer) ? this : this.buffer; }",silent:!0,objectGroup:"linear-memory-inspector"}),i=t.getError();if(i)throw new Error(`Remote object representing ArrayBuffer could not be retrieved: ${i}`);return e=e.runtimeModel().createRemoteObject(t.result),new c.RemoteObject.RemoteArrayBuffer(e)}(r),{internalProperties:d}=await n.object().getOwnProperties(!1),h=d?.find((({name:e})=>"[[ArrayBufferData]]"===e)),m=h?.value?.value;if(!m)throw new Error("Unable to find backing store id for array buffer");const g=d?.find((({name:e})=>"[[WebAssemblyMemory]]"===e)),p=g?.value,u=gt.extractHighlightInfo(e,i);if(u?this.setHighlightInfo(m,u):this.#Be(m),this.#Oe.has(m))return this.#Le.reveal(m,s),void l.ViewManager.ViewManager.instance().showView("linear-memory-inspector");const f=String(p?p.description:n.object().description);this.#Oe.set(m,n.object());const b=new ht(n);this.#Le.create(m,f,b,s),l.ViewManager.ViewManager.instance().showView("linear-memory-inspector")}static extractHighlightInfo(e,t){if(!(e instanceof d.DebuggerLanguagePlugins.ExtensionRemoteObject))return;const i=e.linearMemoryAddress??0;let o;try{o={startAddress:i,size:gt.extractObjectSize(e),name:t?gt.extractObjectName(e,t):t,type:gt.extractObjectTypeDescription(e)}}catch(e){o=void 0}return o}modelRemoved(e){for(const[t,i]of this.#Oe)e===i.runtimeModel()&&(this.#Oe.delete(t),this.#Be(t),this.#Le.close(t))}#Pe(e){const t=e.data;for(const[e,i]of this.#Oe)if(t.runtimeModel()===i.runtimeModel()){const i=t.debuggerPausedDetails()?.callFrames[0];i?this.updateHighlightedMemory(e,i).then((()=>this.#Le.refreshView(e))):(this.#Be(e),this.#Le.refreshView(e))}}#je(e){this.modelRemoved(e.data.runtimeModel())}#ze({data:e}){const t=this.#Oe.get(e);t&&t.release(),this.#Oe.delete(e),this.#Be(e)}async updateHighlightedMemory(e,t){const i=this.getHighlightInfo(e),o=i?.name;if(!i||!o)return void this.#Be(e);const r=await this.evaluateExpression(t,o);if(!r)return void this.#Be(e);const s=gt.extractHighlightInfo(r,o);s&&this.#_e(s,i)?this.setHighlightInfo(e,s):this.#Be(e)}#_e(e,t){return e.type===t.type&&e.startAddress===t.startAddress}}var pt=Object.freeze({__proto__:null,ACCEPTED_MEMORY_TYPES:lt,RemoteArrayBufferWrapper:ht,isDWARFMemoryObject:mt,isMemoryObjectProperty:function(e){return!!("object"===e.type&&e.subtype&&lt.includes(e.subtype)||mt(e))},LinearMemoryInspectorController:gt}),ut=Object.freeze({__proto__:null});export{k as LinearMemoryHighlightChipList,Xe as LinearMemoryInspector,pt as LinearMemoryInspectorController,st as LinearMemoryInspectorPane,Le as LinearMemoryInspectorUtils,O as LinearMemoryNavigator,Se as LinearMemoryValueInterpreter,Be as LinearMemoryViewer,ut as LinearMemoryViewerUtils,ae as ValueInterpreterDisplay,Y as ValueInterpreterDisplayUtils,be as ValueInterpreterSettings};
